\(\int \frac {(d+i c d x) (a+b \arctan (c x))}{x^5} \, dx\) [9]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 124 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x^5} \, dx=-\frac {b c d}{12 x^3}-\frac {i b c^2 d}{6 x^2}+\frac {b c^3 d}{4 x}-\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {i c d (a+b \arctan (c x))}{3 x^3}-\frac {1}{3} i b c^4 d \log (x)+\frac {1}{24} i b c^4 d \log (i-c x)+\frac {7}{24} i b c^4 d \log (i+c x) \]

[Out]

-1/12*b*c*d/x^3-1/6*I*b*c^2*d/x^2+1/4*b*c^3*d/x-1/4*d*(a+b*arctan(c*x))/x^4-1/3*I*c*d*(a+b*arctan(c*x))/x^3-1/
3*I*b*c^4*d*ln(x)+1/24*I*b*c^4*d*ln(I-c*x)+7/24*I*b*c^4*d*ln(I+c*x)

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {45, 4992, 12, 815} \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x^5} \, dx=-\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {i c d (a+b \arctan (c x))}{3 x^3}-\frac {1}{3} i b c^4 d \log (x)+\frac {1}{24} i b c^4 d \log (-c x+i)+\frac {7}{24} i b c^4 d \log (c x+i)+\frac {b c^3 d}{4 x}-\frac {i b c^2 d}{6 x^2}-\frac {b c d}{12 x^3} \]

[In]

Int[((d + I*c*d*x)*(a + b*ArcTan[c*x]))/x^5,x]

[Out]

-1/12*(b*c*d)/x^3 - ((I/6)*b*c^2*d)/x^2 + (b*c^3*d)/(4*x) - (d*(a + b*ArcTan[c*x]))/(4*x^4) - ((I/3)*c*d*(a +
b*ArcTan[c*x]))/x^3 - (I/3)*b*c^4*d*Log[x] + (I/24)*b*c^4*d*Log[I - c*x] + ((7*I)/24)*b*c^4*d*Log[I + c*x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 815

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x)^m*((f + g*x)/(a + c*x^2)), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 4992

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u = I
ntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^2*x^
2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q, 0
]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rubi steps \begin{align*} \text {integral}& = -\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {i c d (a+b \arctan (c x))}{3 x^3}-(b c) \int \frac {d (-3-4 i c x)}{12 x^4 \left (1+c^2 x^2\right )} \, dx \\ & = -\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {i c d (a+b \arctan (c x))}{3 x^3}-\frac {1}{12} (b c d) \int \frac {-3-4 i c x}{x^4 \left (1+c^2 x^2\right )} \, dx \\ & = -\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {i c d (a+b \arctan (c x))}{3 x^3}-\frac {1}{12} (b c d) \int \left (-\frac {3}{x^4}-\frac {4 i c}{x^3}+\frac {3 c^2}{x^2}+\frac {4 i c^3}{x}-\frac {i c^4}{2 (-i+c x)}-\frac {7 i c^4}{2 (i+c x)}\right ) \, dx \\ & = -\frac {b c d}{12 x^3}-\frac {i b c^2 d}{6 x^2}+\frac {b c^3 d}{4 x}-\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {i c d (a+b \arctan (c x))}{3 x^3}-\frac {1}{3} i b c^4 d \log (x)+\frac {1}{24} i b c^4 d \log (i-c x)+\frac {7}{24} i b c^4 d \log (i+c x) \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.04 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.80 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x^5} \, dx=-\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {i c d (a+b \arctan (c x))}{3 x^3}-\frac {b c d \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-c^2 x^2\right )}{12 x^3}-\frac {1}{6} i b c^2 d \left (\frac {1}{x^2}+2 c^2 \log (x)-c^2 \log \left (1+c^2 x^2\right )\right ) \]

[In]

Integrate[((d + I*c*d*x)*(a + b*ArcTan[c*x]))/x^5,x]

[Out]

-1/4*(d*(a + b*ArcTan[c*x]))/x^4 - ((I/3)*c*d*(a + b*ArcTan[c*x]))/x^3 - (b*c*d*Hypergeometric2F1[-3/2, 1, -1/
2, -(c^2*x^2)])/(12*x^3) - (I/6)*b*c^2*d*(x^(-2) + 2*c^2*Log[x] - c^2*Log[1 + c^2*x^2])

Maple [A] (verified)

Time = 0.69 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.81

method result size
parts \(a d \left (-\frac {1}{4 x^{4}}-\frac {i c}{3 x^{3}}\right )+b d \,c^{4} \left (-\frac {\arctan \left (c x \right )}{4 c^{4} x^{4}}-\frac {i \arctan \left (c x \right )}{3 c^{3} x^{3}}-\frac {i}{6 c^{2} x^{2}}-\frac {i \ln \left (c x \right )}{3}-\frac {1}{12 c^{3} x^{3}}+\frac {1}{4 c x}+\frac {i \ln \left (c^{2} x^{2}+1\right )}{6}+\frac {\arctan \left (c x \right )}{4}\right )\) \(101\)
derivativedivides \(c^{4} \left (a d \left (-\frac {1}{4 c^{4} x^{4}}-\frac {i}{3 c^{3} x^{3}}\right )+b d \left (-\frac {\arctan \left (c x \right )}{4 c^{4} x^{4}}-\frac {i \arctan \left (c x \right )}{3 c^{3} x^{3}}-\frac {i}{6 c^{2} x^{2}}-\frac {i \ln \left (c x \right )}{3}-\frac {1}{12 c^{3} x^{3}}+\frac {1}{4 c x}+\frac {i \ln \left (c^{2} x^{2}+1\right )}{6}+\frac {\arctan \left (c x \right )}{4}\right )\right )\) \(107\)
default \(c^{4} \left (a d \left (-\frac {1}{4 c^{4} x^{4}}-\frac {i}{3 c^{3} x^{3}}\right )+b d \left (-\frac {\arctan \left (c x \right )}{4 c^{4} x^{4}}-\frac {i \arctan \left (c x \right )}{3 c^{3} x^{3}}-\frac {i}{6 c^{2} x^{2}}-\frac {i \ln \left (c x \right )}{3}-\frac {1}{12 c^{3} x^{3}}+\frac {1}{4 c x}+\frac {i \ln \left (c^{2} x^{2}+1\right )}{6}+\frac {\arctan \left (c x \right )}{4}\right )\right )\) \(107\)
parallelrisch \(\frac {2 i \ln \left (c^{2} x^{2}+1\right ) x^{4} b \,c^{4} d -4 i \ln \left (x \right ) x^{4} b \,c^{4} d +2 i x^{4} b \,c^{4} d +3 x^{4} \arctan \left (c x \right ) b \,c^{4} d +3 c^{3} x^{3} d b -2 i x^{2} b \,c^{2} d -4 i x \arctan \left (c x \right ) b c d -4 i a c d x -b c d x -3 b d \arctan \left (c x \right )-3 a d}{12 x^{4}}\) \(123\)
risch \(-\frac {\left (4 b c d x -3 i b d \right ) \ln \left (i c x +1\right )}{24 x^{4}}+\frac {i d \left (7 b \,c^{4} \ln \left (-15 c x -15 i\right ) x^{4}+b \,c^{4} \ln \left (9 c x -9 i\right ) x^{4}-8 b \,c^{4} \ln \left (-45 c x \right ) x^{4}-6 i b \,c^{3} x^{3}-4 b \,c^{2} x^{2}-8 c x a -4 i b c x \ln \left (-i c x +1\right )-3 b \ln \left (-i c x +1\right )+2 i b c x +6 i a \right )}{24 x^{4}}\) \(141\)

[In]

int((d+I*c*d*x)*(a+b*arctan(c*x))/x^5,x,method=_RETURNVERBOSE)

[Out]

a*d*(-1/4/x^4-1/3*I*c/x^3)+b*d*c^4*(-1/4*arctan(c*x)/c^4/x^4-1/3*I*arctan(c*x)/c^3/x^3-1/6*I/c^2/x^2-1/3*I*ln(
c*x)-1/12/c^3/x^3+1/4/c/x+1/6*I*ln(c^2*x^2+1)+1/4*arctan(c*x))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.96 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x^5} \, dx=\frac {-8 i \, b c^{4} d x^{4} \log \left (x\right ) + 7 i \, b c^{4} d x^{4} \log \left (\frac {c x + i}{c}\right ) + i \, b c^{4} d x^{4} \log \left (\frac {c x - i}{c}\right ) + 6 \, b c^{3} d x^{3} - 4 i \, b c^{2} d x^{2} - 2 \, {\left (4 i \, a + b\right )} c d x - 6 \, a d + {\left (4 \, b c d x - 3 i \, b d\right )} \log \left (-\frac {c x + i}{c x - i}\right )}{24 \, x^{4}} \]

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x^5,x, algorithm="fricas")

[Out]

1/24*(-8*I*b*c^4*d*x^4*log(x) + 7*I*b*c^4*d*x^4*log((c*x + I)/c) + I*b*c^4*d*x^4*log((c*x - I)/c) + 6*b*c^3*d*
x^3 - 4*I*b*c^2*d*x^2 - 2*(4*I*a + b)*c*d*x - 6*a*d + (4*b*c*d*x - 3*I*b*d)*log(-(c*x + I)/(c*x - I)))/x^4

Sympy [A] (verification not implemented)

Time = 3.85 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.73 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x^5} \, dx=- \frac {i b c^{4} d \log {\left (135 b^{2} c^{9} d^{2} x \right )}}{3} + \frac {i b c^{4} d \log {\left (135 b^{2} c^{9} d^{2} x - 135 i b^{2} c^{8} d^{2} \right )}}{24} + \frac {7 i b c^{4} d \log {\left (135 b^{2} c^{9} d^{2} x + 135 i b^{2} c^{8} d^{2} \right )}}{24} + \frac {\left (- 4 b c d x + 3 i b d\right ) \log {\left (i c x + 1 \right )}}{24 x^{4}} + \frac {\left (4 b c d x - 3 i b d\right ) \log {\left (- i c x + 1 \right )}}{24 x^{4}} + \frac {- 3 a d + 3 b c^{3} d x^{3} - 2 i b c^{2} d x^{2} + x \left (- 4 i a c d - b c d\right )}{12 x^{4}} \]

[In]

integrate((d+I*c*d*x)*(a+b*atan(c*x))/x**5,x)

[Out]

-I*b*c**4*d*log(135*b**2*c**9*d**2*x)/3 + I*b*c**4*d*log(135*b**2*c**9*d**2*x - 135*I*b**2*c**8*d**2)/24 + 7*I
*b*c**4*d*log(135*b**2*c**9*d**2*x + 135*I*b**2*c**8*d**2)/24 + (-4*b*c*d*x + 3*I*b*d)*log(I*c*x + 1)/(24*x**4
) + (4*b*c*d*x - 3*I*b*d)*log(-I*c*x + 1)/(24*x**4) + (-3*a*d + 3*b*c**3*d*x**3 - 2*I*b*c**2*d*x**2 + x*(-4*I*
a*c*d - b*c*d))/(12*x**4)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.82 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x^5} \, dx=\frac {1}{6} i \, {\left ({\left (c^{2} \log \left (c^{2} x^{2} + 1\right ) - c^{2} \log \left (x^{2}\right ) - \frac {1}{x^{2}}\right )} c - \frac {2 \, \arctan \left (c x\right )}{x^{3}}\right )} b c d + \frac {1}{12} \, {\left ({\left (3 \, c^{3} \arctan \left (c x\right ) + \frac {3 \, c^{2} x^{2} - 1}{x^{3}}\right )} c - \frac {3 \, \arctan \left (c x\right )}{x^{4}}\right )} b d - \frac {i \, a c d}{3 \, x^{3}} - \frac {a d}{4 \, x^{4}} \]

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x^5,x, algorithm="maxima")

[Out]

1/6*I*((c^2*log(c^2*x^2 + 1) - c^2*log(x^2) - 1/x^2)*c - 2*arctan(c*x)/x^3)*b*c*d + 1/12*((3*c^3*arctan(c*x) +
 (3*c^2*x^2 - 1)/x^3)*c - 3*arctan(c*x)/x^4)*b*d - 1/3*I*a*c*d/x^3 - 1/4*a*d/x^4

Giac [F]

\[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x^5} \, dx=\int { \frac {{\left (i \, c d x + d\right )} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{5}} \,d x } \]

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x^5,x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.64 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.94 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x^5} \, dx=\frac {d\,\left (\frac {3\,b\,c^7\,\mathrm {atan}\left (\frac {c^2\,x}{\sqrt {c^2}}\right )}{{\left (c^2\right )}^{3/2}}+b\,c^4\,\ln \left (c^2\,x^2+1\right )\,2{}\mathrm {i}-b\,c^4\,\ln \left (x\right )\,4{}\mathrm {i}\right )}{12}-\frac {\frac {d\,\left (3\,a+3\,b\,\mathrm {atan}\left (c\,x\right )\right )}{12}+\frac {d\,x\,\left (a\,c\,4{}\mathrm {i}+b\,c+b\,c\,\mathrm {atan}\left (c\,x\right )\,4{}\mathrm {i}\right )}{12}-\frac {b\,c^3\,d\,x^3}{4}+\frac {b\,c^2\,d\,x^2\,1{}\mathrm {i}}{6}}{x^4} \]

[In]

int(((a + b*atan(c*x))*(d + c*d*x*1i))/x^5,x)

[Out]

(d*(b*c^4*log(c^2*x^2 + 1)*2i - b*c^4*log(x)*4i + (3*b*c^7*atan((c^2*x)/(c^2)^(1/2)))/(c^2)^(3/2)))/12 - ((d*(
3*a + 3*b*atan(c*x)))/12 + (d*x*(a*c*4i + b*c + b*c*atan(c*x)*4i))/12 + (b*c^2*d*x^2*1i)/6 - (b*c^3*d*x^3)/4)/
x^4